
<div class="fui-page page-merch-list">
    <div class="fui-content" style="bottom: 2.4rem">
        <div class="fui-searchbar bar">
                <div class="searchbar center">
                    <input type="submit" ng-click="pagedata.getlist(1)" class="searchbar-cancel searchbtn" value="搜索" />
                    <div class="search-input">
                        <i class="icon icon-search"></i>
                        <input type="search" placeholder="输入关键字..." class="search" ng-model="pagedata.params.keyword">
                    </div>
                </div>
         </div>
        <div id="carousel-container" ng-if="pagedata.pluginset.hdps.length>0" class="carousel slide" data-role="carousel" data-param-auto="true">
			<div class="carousel-inner" role="listbox" style="height:6rem">
				<div ng-class="{'item':1,'active':$index==0}" ng-repeat="item in pagedata.pluginset.hdps">
					<a href="#">
						<img src="{{tomedia(item.picurl) || '../core/resource/images/banner-1.jpg'}}" style="display: block; width: 100%; height: 100%;">
					</a>
				</div>
			</div>
			<style>
					.fui-swipe-page .fui-swipe-bullet {background: {background}; opacity: {opacity};}
					.fui-swipe-page .fui-swipe-bullet.active {opacity: 1;}
			</style>
			<div id="carousel-jinyun" class="fui-swipe-page" style="padding: 0 5px; bottom: 10px; ">
				<div class="fui-swipe-bullet" ng-repeat="item in pagedata.pluginset.hdps" ng-class="{'active':$index==0}" data-target="#carousel-container" data-slide-to="{{$index}}"></div>
			</div>
		</div>

       <div class="container">
			<div class="fui-picturew row-2">
                <a ng-repeat="item in pagedata.list" class="item"  style="padding: 5px;" href="{{item.url}}">
                    <div class="image" style="width:100%;height:150px;background:url('{{tomedia(item.logo) || '../core/resource/images/nopic.jpg'}}') no-repeat 50%;background-size: cover;">
						<div class="vote-number">{{item.id}}号，{{item.title}}</div>
						<div class="pics">{{item.picsnum || 0}}P</div>
                    </div>
					<div class="btn-footer">
							<div class="b-left">参与</div>
							<div class="b-right">{{item.votenums || 0}}次</div>
					</div>
                </a>
			</div>
        </div>

</div>
<div ng-include="sys_html('common/pluginnav',true)"></div>
<script type="text/javascript">
//手机软键盘--搜索
$("body").keydown(function() {
    if (event.keyCode == "13") {
        $('#searchsub').click();
    }
});
scope.loading = true;
var page = 1;
var keyword = '';
scope.pagedata.getlist=function(e){
	if(e==1){
		page = 1;
		scope.pagedata.list=[]
	}
	keyword =scope.pagedata.params.keyword?scope.pagedata.params.keyword:'';
		var params = {
					'plugin':'jy_h5game',
					'action':'index',
					'op':'getlist',
					'data':{
						'page':page,
						'keyword':keyword,
					},
					'callback':function(data){
							if(data.error !=1){
							 for (var i=0;i<data.list.length;i++){
									scope.pagedata.list.push(data.list[i]);
								}
								if(page >1){
									$("#store-item").animate({scrollTop:0},300);
								}
								page++;
								scope.loading = false;
								window.scope.pagedata.list=data.list;
								scope.$apply();
							}else{
								onsole.log('error');
							};
					}
		}
		scope.post_json(params);
}
scope.pagedata.getlist(1);

</script>